var del = document.getElementsByClassName('delete')[0];//删除按钮
var oLi = document.getElementsByTagName('li');
var oUl = document.getElementsByClassName('content')[0];
del.onclick=function(){
    for(var i=5;i<oLi.length;i++){
        oLi[i].style.border='2px solid #cccccc';
        oLi[i].onclick=function(){
            this.style.border='2px solid red';
            del.onclick=function(){
                for(var i=5;i<oLi.length;i++){
                    if(oLi[i].style.border == '2px solid red'){
                        oLi[i].remove();
                        i--;
                    }
                }
            }
        }
    }
}

var pation = [{
    p_href:'cases_details.html',
    p_time:'就诊时间：',
    p_times:'2019-04-01',
    p_keshi:'就诊科室：骨科',
    p_miaoshu:'病情描述：左腿粉碎性骨折左腿粉碎...'
},{
    p_href:'cases_details.html',
    p_time:'就诊时间：',
    p_times:'2019-04-01',
    p_keshi:'就诊科室：骨科',
    p_miaoshu:'病情描述：左腿粉碎性骨折左腿粉碎...'
},{
    p_href:'cases_details.html',
    p_time:'就诊时间：',
    p_times:'2019-04-01',
    p_keshi:'就诊科室：骨科',
    p_miaoshu:'病情描述：左腿粉碎性骨折左腿粉碎...'
},{
    p_href:'cases_details.html',
    p_time:'就诊时间：',
    p_times:'2019-04-01',
    p_keshi:'就诊科室：骨科',
    p_miaoshu:'病情描述：左腿粉碎性骨折左腿粉碎...'
},{
    p_href:'cases_details.html',
    p_time:'就诊时间：',
    p_times:'2019-04-01',
    p_keshi:'就诊科室：骨科',
    p_miaoshu:'病情描述：左腿粉碎性骨折左腿粉碎...'
},{
    p_href:'cases_details.html',
    p_time:'就诊时间：',
    p_times:'2019-04-01',
    p_keshi:'就诊科室：骨科',
    p_miaoshu:'病情描述：左腿粉碎性骨折左腿粉碎...'
}];
for(var i=0;i<pation.length;i++){
    oUl.innerHTML+='<li><a href="'+pation[i].p_href+'"><div>'+pation[i].p_time+'<span class="black">'+pation[i].p_times+'</span></div><div>'+pation[i].p_keshi+'</div><div>'+pation[i].p_miaoshu+'</div></a></li>';
}